/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cqcis.uip.base.framework.handlers;

import org.apache.commons.httpclient.HttpMethod;

import com.cqcis.uip.base.framework.common.HttpClient;
import com.cqcis.uip.base.framework.common.Role;
import com.cqcis.uip.base.framework.common.Task;
import com.cqcis.uip.base.framework.core.ServiceRole;

/**
 * HTTP CLIENT
 * 
 * @author huangmy
 * @date   2008-10-13
 */
@ServiceRole(Role.HTTP_CLIENT)
public interface HttpClientService {
	/**
	 * 发送http指令
	 * 
	 * @param task
	 * @return
	 * @throws Exception
	 */
	public HttpMethod doMessageSend(HttpClient hc, final Task task) throws Exception;
	
	/**
	 * 接收http指令
	 * 
	 * @param method
	 * @param task
	 * @throws Exception
	 */
	public void doMessageReceived(HttpMethod method, final Task task) throws Exception;
}
